package org.reference.generic.base;


/**
 * 
 */
public class Parameter extends Item {

	public static final String TYPE_MAX_DEPTH 		= "MAX_DEPTH";
	public static final String TYPE_DEPTH 			= "DEPTH";
	public static final String TYPE_ARITY 			= "ARITY";
	public static final String TYPE_TERM_VALUE 		= "TERM_VALUE";
	public static final String TYPE_MACHINE_STEP 	= "MACHINE_STEP";
	public static final String TYPE_REPRODUCTION_RATE= "REPRODUCTION_RATE";
	public static final String TYPE_MUTATION_RATE 	= "MUTATION_RATE";
	public static final String TYPE_REFERENCE_CMAX 	= "REFERENCE_CMAX";
	public static final String TYPE_CROSSOVER_RATE 	= "CROSSOVER_RATE";
	public static final String TYPE_GENERATION 	= "GENERATION";            //정의: generation은 reference cmax갯수와 동일한 숫자여야됨. reference cmax와 process를 실행하여 얻은 cmax 값과 비교하기 위
	public static final String TYPE_JOB_NUMBER 	= "JOB_NUMBER";
	public static final String TYPE_MACHINE_NUMBER 	= "MACHINE_NUMBER";
	public static final String TYPE_GENE_POPULATION = "GENE_POPULATION";
	
	public static final String TYPE_VALUE_RM	= "TYPE_RM";
	public static final String TYPE_VALUE_PT	= "TYPE_PT";
	public static final String TYPE_VALUE_CT	= "TYPE_CT";
	
	
	/**
	 * 
	 */
	public Parameter(String name, String value) {
		setName(name);
		setValue(value);
		setType(ValueType.String);
    }
	
    /**
     * 
     */
    public Parameter() {
    }

    /**
     * 
     */
    private ValueType type;

    /**
     * @param type
     */
    protected void setType(ValueType type) {	
    	this.type= type;
    }

    /**
     * @return
     */
    public ValueType getType() {
        // TODO implement here
        return null;
    }

    /**
     * @return
     */
    public String getValueToString() {
        return String.valueOf(getValue());//double형 string 
    }

    /**
     * @return
     */
    public int getValueToInt() {
        return Integer.valueOf(getValue());
    }

    /**
     * @return
     */
    public float getValueToFloat() {
        return Float.valueOf(getValue());
    }

    /**
     * @return
     */
    public double getValueToDouble() {
       
        return Double.valueOf(getValue());
    }

    /**
     * 
     */
    public enum ValueType {
        None,
        String,
        Int,
        Float,
        Double
    }

}